<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('room/index')}">所有班级</a></li>
        <li><a href="{:url('room/add')}">添加班级</a></li>
        <li class="active"><a href="{:url('room/edit')}">编辑班级</a></li>
    </ul>
    <form class="form-horizontal js-ajax-form margin-top-20" action="{:url('room/edit')}" method="post">
        <div class="form-group">
            <label for="input-name" class="col-sm-2 control-label">班级名称</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-name" name="name" value="{$room.name}">
                <input type="hidden" name="id" value="{$room.id}">
            </div>
        </div>
        <div class="form-group">
            <label for="sid" class="col-sm-2 control-label">学校</label>
            <div class="col-md-6 col-sm-10">
                <select class="form-control" name="sid" id="sid">
                    <option value="" selected>请选择学校</option>
                    <foreach name="school" item="vo">
                        <if $vo.id==$room.sid>
                            <option value="{$vo.id}" selected>{$vo.name}</option>
                            <else />
                            <option value="{$vo.id}">{$vo.name}</option>
                        </if>
                    </foreach>
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('EDIT')}</button>
                <a class="btn btn-default" href="{:url('admin/room/index')}">{:lang('BACK')}</a>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js">
</script>
</body>
</html>